package review.interfacedemo;


public class TestComputer {
    public static void main(String[] args) {

        // 注意：接口的引用可以指向任意实现该接口的对象
        // 接口的引用可以指向不同实现类的对象，因此就可以实现多态
        IUSB usb = new Mouse();
        usb = new KeyBoard();

        Computer computer = new Computer();

        computer.powerOn();

        computer.useUSBDevice(new Mouse());

        computer.useUSBDevice(new KeyBoard());

        computer.powerOff();
    }
}
